import React, { Component } from 'react'
import Son from './Son'

export default class Father extends Component {
    state = {
        num: ''
    }
    render() {
        console.log('render')
        return (
            <div>
                <h4>我是父组件 -- { this.state.num }</h4>
                <Son fn = { (num) => {
                    this.setState({
                        num
                    })
                }}/>
            </div>
        )
    }
}
